<form class="form-horizontal">
    <div class="control-group" title="{{ _('Serial port to connect to, setting this to AUTO will make OctoPrint try to automatically find the right setting') }}">
        <label class="control-label" for="settings-serialPort">{{ _('Serial Port') }}</label>
        <div class="controls">
            <select id="settings-serialPort" data-bind="options: serial_portOptions, optionsCaption: 'AUTO', value: serial_port"></select>
        </div>
    </div>
    <div class="control-group" title="{{ _('Serial baud rate to connect with, setting this to AUTO will make OctoPrint try to automatically find the right setting') }}">
        <label class="control-label" for="settings-baudrate">{{ _('Baudrate') }}</label>
        <div class="controls">
            <select id="settings-baudrate" data-bind="options: serial_baudrateOptions, optionsCaption: 'AUTO', value: serial_baudrate"></select>
        </div>
    </div>
    <div class="control-group" title="{{ _('Makes OctoPrint try to connect to the printer automatically during start up') }}">
        <div class="controls">
            <label class="checkbox">
                <input type="checkbox" data-bind="checked: serial_autoconnect" id="settings-serialAutoconnect"> {{ _('Auto-connect to printer on server start') }}
            </label>
        </div>
    </div>
    <div class="control-group" title="{{ _('Interval in which to poll for the temperature information from the printer while printing') }}">
        <label class="control-label" for="settings-serialTimeoutTemperature">{{ _('Temperature interval') }}</label>
        <div class="controls">
            <div class="input-append">
                <input type="number" step="any" min="1" class="input-mini text-right" data-bind="value: serial_timeoutTemperature" id="settings-serialTimeoutTemperature">
                <span class="add-on">s</span>
            </div>
        </div>
    </div>
    <div class="control-group" title="{{ _('Interval in which to poll for the SD printing status information from the printer while printing') }}">
        <label class="control-label" for="settings-serialTimeoutSdStatus">{{ _('SD status interval') }}</label>
        <div class="controls">
            <div class="input-append">
                <input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutSdStatus" id="settings-serialTimeoutSdStatus">
                <span class="add-on">s</span>
            </div>
        </div>
    </div>
    <div class="control-group" title="{{ _('Time after which the communication with your printer will be considered timed out if nothing was sent by your printer (and an attempt to get it talking again will be done). Increase this if your printer takes longer than this for some moves. This is also the interval in which the temperature will be polled from the printer while not printing.') }}">
        <label class="control-label" for="settings-serialTimeoutCommunication">{{ _('Communication timeout') }}</label>
        <div class="controls">
            <div class="input-append">
                <input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutCommunication" id="settings-serialTimeoutCommunication">
                <span class="add-on">s</span>
            </div>
        </div>
    </div>
    <div class="control-group" title="{{ _('Time after which a connection attempt to the printer will be considered as having failed') }}">
        <label class="control-label" for="settings-serialTimeoutConnection">{{ _('Connection timeout') }}</label>
        <div class="controls">
            <div class="input-append">
                <input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutConnection" id="settings-serialTimeoutConnection">
                <span class="add-on">s</span>
            </div>
        </div>
    </div>
    <div class="control-group" title="{{ _('Time after which to consider an auto detection attempt to have failed if no successful connection is detected') }}">
        <label class="control-label" for="settings-serialTimeoutDetection">{{ _('Autodetection timeout') }}</label>
        <div class="controls">
            <div class="input-append">
                <input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutDetection" id="settings-serialTimeoutDetection">
                <span class="add-on">s</span>
            </div>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <label class="checkbox">
                <input type="checkbox" data-bind="checked: serial_log" id="settings-serialLog"> {{ _('Log communication to serial.log (might negatively impact performance)') }} <span class="label label-important">{{ _('Warning') }}</span>
            </label>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="settings-serialLongRunningCommands">{{ _('Long running commands') }}</label>
        <div class="controls">
            <input type="text" class="input-block-level" id="settings-serialLongRunningCommands" data-bind="value: serial_longRunningCommands">
            <span class="help-inline">{{ _('Use this to specify the commands known to take a long time to complete without output from your printer and hence might cause timeout issues. Just the G or M code, comma separated.')|format(glob_url="http://docs.python.org/2/library/glob.html") }}</span>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="settings-serialAdditionalPorts">{{ _('Additional serial ports') }}</label>
        <div class="controls">
            <textarea rows="4" class="block" id="settings-serialAdditionalPorts" data-bind="value: serial_additionalPorts"></textarea>
            <span class="help-inline">{{ _('Use this to define additional <a href="%%(glob_url)s">glob patterns</a> matching serial ports to list for connecting against, e.g. <code>/dev/ttyAMA*</code>. One entry per line.')|format(glob_url="http://docs.python.org/2/library/glob.html") }}</span>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <label class="checkbox">
                <input type="checkbox" data-bind="checked: serial_disconnectOnErrors" id="settings-disconnectOnErrors"> {{ _('Not only cancel ongoing prints but also disconnect on unhandled errors from the firmware.') }}</span>
            </label>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <label class="checkbox">
                <input type="checkbox" data-bind="checked: serial_ignoreErrorsFromFirmware" id="settings-ignoreErrorsFromFirmware"> {{ _('Ignore any unhandled errors from the firmware. Only use this if your firmware sends stuff prefixed with "Error" that is not an actual error. Might mask printer issues, be careful!') }} <span class="label label-important">{{ _('Warning') }}</span>
            </label>
        </div>
    </div>
</form>
